package com.gdyx.app.web.model;

import java.io.Serializable;
import java.util.Arrays;

public class MpsUser implements Serializable {
    private String id = "";
    private String name = "";
    private String pasv = "";
    private String descr = "";
    private long sort = 99999;
    private Integer status = 0;
    private String createTime = "";
    private String createOwner = "";
    private String modifyTime = "";
    private String modifyOwner = "";
    private String[] roles;
    private String[] depts;
    private String[] orgs;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPasv() {
        return pasv;
    }

    public void setPasv(String pasv) {
        this.pasv = pasv;
    }

    public String getDescr() {
        return descr;
    }

    public void setDescr(String descr) {
        this.descr = descr;
    }

    public long getSort() {
        return sort;
    }

    public void setSort(long sort) {
        this.sort = sort;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getCreateOwner() {
        return createOwner;
    }

    public void setCreateOwner(String createOwner) {
        this.createOwner = createOwner;
    }

    public String getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(String modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getModifyOwner() {
        return modifyOwner;
    }

    public void setModifyOwner(String modifyOwner) {
        this.modifyOwner = modifyOwner;
    }

    public String[] getRoles() {
        return roles;
    }

    public void setRoles(String[] roles) {
        this.roles = roles;
    }

    public String[] getDepts() {
        return depts;
    }

    public void setDepts(String[] depts) {
        this.depts = depts;
    }

    public String[] getOrgs() {
        return orgs;
    }

    public void setOrgs(String[] orgs) {
        this.orgs = orgs;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MpsUser mpsUser = (MpsUser) o;

        if (sort != mpsUser.sort) return false;
        if (id != null ? !id.equals(mpsUser.id) : mpsUser.id != null) return false;
        if (name != null ? !name.equals(mpsUser.name) : mpsUser.name != null) return false;
        if (pasv != null ? !pasv.equals(mpsUser.pasv) : mpsUser.pasv != null) return false;
        if (descr != null ? !descr.equals(mpsUser.descr) : mpsUser.descr != null) return false;
        if (status != null ? !status.equals(mpsUser.status) : mpsUser.status != null) return false;
        if (createTime != null ? !createTime.equals(mpsUser.createTime) : mpsUser.createTime != null) return false;
        if (createOwner != null ? !createOwner.equals(mpsUser.createOwner) : mpsUser.createOwner != null) return false;
        if (modifyTime != null ? !modifyTime.equals(mpsUser.modifyTime) : mpsUser.modifyTime != null) return false;
        if (modifyOwner != null ? !modifyOwner.equals(mpsUser.modifyOwner) : mpsUser.modifyOwner != null) return false;
        // Probably incorrect - comparing Object[] arrays with Arrays.equals
        if (!Arrays.equals(roles, mpsUser.roles)) return false;
        // Probably incorrect - comparing Object[] arrays with Arrays.equals
        if (!Arrays.equals(depts, mpsUser.depts)) return false;
        // Probably incorrect - comparing Object[] arrays with Arrays.equals
        return Arrays.equals(orgs, mpsUser.orgs);
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (pasv != null ? pasv.hashCode() : 0);
        result = 31 * result + (descr != null ? descr.hashCode() : 0);
        result = 31 * result + (int) (sort ^ (sort >>> 32));
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (createOwner != null ? createOwner.hashCode() : 0);
        result = 31 * result + (modifyTime != null ? modifyTime.hashCode() : 0);
        result = 31 * result + (modifyOwner != null ? modifyOwner.hashCode() : 0);
        result = 31 * result + Arrays.hashCode(roles);
        result = 31 * result + Arrays.hashCode(depts);
        result = 31 * result + Arrays.hashCode(orgs);
        return result;
    }
}